-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
groq-builder: zod compatibility #257
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Ignored Deployment
|
…they can be chained; enforce stronger for projections
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks good to me, although a lot of this is over my head. Making Zod tree-shakable is important.
…ctTypeOf` from vitest
…added before queries
I added like a hundred more commits :) I had a lot of things on the mind to fix and improve! |
@scottrippey not sure if this is the right format but using Zod for all validation will certainly slow down the editors and possibly noticable runtime validations as queries become complex. Added a bit context in #261 but after using Groqd for >10 production projects we are scrambling for an option as developer experience has become intolerable. |
I'd love to discuss! I'd love to hear more about the kind of performance issues you've experienced. Are these run time issues? Or TypeScript + IDE performance issues? |
What
Ensures full compatibility with Zod.
Ditches the "lite validation" that I had implemented.
If Zod is not used, it can still be tree-shaken with this approach, so it's still an "optional" dependency.
Additional changes:
validationRequired: true
flag, for enforcing runtime validation if desired$
fromq.conditional$
andq.select$
methods; these are now justq.conditional
andq.select
| null
types